import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Microsoft
 * Date: 2023-01-31
 * Time: 22:22
 */
class Main{
    public static void quickSort(int[] q,int l,int r){
        if(l>=r)return;
        int i = l-1, j = r+1, x = q[l+r>>1]; //j不能取到右边界,所以取下界(q[l]或q[l+r>>1])
        while(i<j){
            do {
                i++;
            }while(q[i]<x);
            do {
                j--;
            } while(q[j]>x);
            if(i<j){
                int tmp = q[i];
                q[i]=q[j];
                q[j]=tmp;
            }
        }
        quickSort(q,l,j);  //j不能取到右边界，不然就无限递归下去了 此时q[j]<=x，q[j+1]>=x
        quickSort(q,j+1,r);
    }
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; i++) {
            arr[i] = scanner.nextInt();
        }
        quickSort(arr,0,n-1);
        for(int i = 0; i < n; i++) {
            System.out.print(arr[i] + " ");
        }
    }
}